
package cn.com.service.user.mapper;


import cn.qitom.service.user.entity.UserBase;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


/**
 * Mapper 接口
 *
 * @author momo
 */
@Mapper
public interface UserBaseMapper extends BaseMapper<UserBase> {
	@Select(" SELECT" +
				"     id,phone,account,name,real_name" +
				"        FROM" +
				"     blade_user_base" +
				"        WHERE" +
				"     phone = #{phone} and password = #{password} and is_deleted = 0 limit 1")
	UserBase getUserBase(@Param("phone") String phone, @Param("password") String password);

	@Select(" SELECT" +
				"     id,phone,account,name,real_name" +
				"        FROM" +
				"     blade_user_base" +
				"        WHERE" +
				"     phone = #{phone}  and is_deleted = 0 limit 1")
	UserBase getUserBaseByPhone(@Param("phone") String phone);

}
